[XEN][POWERPC] cleanup hard tabs
authorJimi Xenidis <jimix@watson.ibm.com>
Wed, 29 Nov 2006 00:01:46 +0000 (19:01 -0500)
committerJimi Xenidis <jimix@watson.ibm.com>
Wed, 29 Nov 2006 00:01:46 +0000 (19:01 -0500)
allowed in some files in order to track linux lineage
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/arch/powerpc/bitops.c
xen/arch/powerpc/external.c
xen/arch/powerpc/memory.c
xen/arch/powerpc/of-devtree.h
xen/arch/powerpc/of_handler/console.c
xen/arch/powerpc/papr/xlate.c
xen/arch/powerpc/rtas.c
xen/arch/powerpc/shadow.c
xen/arch/powerpc/smp.c

index 1b731a9b66dec81cfa788b9c8b40c0ccd93b7c41..02a53384b1ebe7588707e088c6baa62f60184323 100644 (file)
  * @size: The maximum size to search
  */
 unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
-                           unsigned long offset)
+                            unsigned long offset)
 {
-       const unsigned long *p = addr + BITOP_WORD(offset);
-       unsigned long result = offset & ~(BITS_PER_LONG-1);
-       unsigned long tmp;
+    const unsigned long *p = addr + BITOP_WORD(offset);
+    unsigned long result = offset & ~(BITS_PER_LONG-1);
+    unsigned long tmp;
 
-       if (offset >= size)
-               return size;
-       size -= result;
-       offset %= BITS_PER_LONG;
-       if (offset) {
-               tmp = *(p++);
-               tmp &= (~0UL << offset);
-               if (size < BITS_PER_LONG)
-                       goto found_first;
-               if (tmp)
-                       goto found_middle;
-               size -= BITS_PER_LONG;
-               result += BITS_PER_LONG;
-       }
-       while (size & ~(BITS_PER_LONG-1)) {
-               if ((tmp = *(p++)))
-                       goto found_middle;
-               result += BITS_PER_LONG;
-               size -= BITS_PER_LONG;
-       }
-       if (!size)
-               return result;
-       tmp = *p;
+    if (offset >= size)
+        return size;
+    size -= result;
+    offset %= BITS_PER_LONG;
+    if (offset) {
+        tmp = *(p++);
+        tmp &= (~0UL << offset);
+        if (size < BITS_PER_LONG)
+            goto found_first;
+        if (tmp)
+            goto found_middle;
+        size -= BITS_PER_LONG;
+        result += BITS_PER_LONG;
+    }
+    while (size & ~(BITS_PER_LONG-1)) {
+        if ((tmp = *(p++)))
+            goto found_middle;
+        result += BITS_PER_LONG;
+        size -= BITS_PER_LONG;
+    }
+    if (!size)
+        return result;
+    tmp = *p;
 
 found_first:
-       tmp &= (~0UL >> (BITS_PER_LONG - size));
-       if (tmp == 0UL)         /* Are any bits set? */
-               return result + size;   /* Nope. */
+    tmp &= (~0UL >> (BITS_PER_LONG - size));
+    if (tmp == 0UL)        /* Are any bits set? */
+        return result + size;    /* Nope. */
 found_middle:
-       return result + __ffs(tmp);
+    return result + __ffs(tmp);
 }
 
 /*
@@ -55,40 +55,40 @@ found_middle:
  * Linus' asm-alpha/bitops.h.
  */
 unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
-                                unsigned long offset)
+                                 unsigned long offset)
 {
-       const unsigned long *p = addr + BITOP_WORD(offset);
-       unsigned long result = offset & ~(BITS_PER_LONG-1);
-       unsigned long tmp;
+    const unsigned long *p = addr + BITOP_WORD(offset);
+    unsigned long result = offset & ~(BITS_PER_LONG-1);
+    unsigned long tmp;
 
-       if (offset >= size)
-               return size;
-       size -= result;
-       offset %= BITS_PER_LONG;
-       if (offset) {
-               tmp = *(p++);
-               tmp |= ~0UL >> (BITS_PER_LONG - offset);
-               if (size < BITS_PER_LONG)
-                       goto found_first;
-               if (~tmp)
-                       goto found_middle;
-               size -= BITS_PER_LONG;
-               result += BITS_PER_LONG;
-       }
-       while (size & ~(BITS_PER_LONG-1)) {
-               if (~(tmp = *(p++)))
-                       goto found_middle;
-               result += BITS_PER_LONG;
-               size -= BITS_PER_LONG;
-       }
-       if (!size)
-               return result;
-       tmp = *p;
+    if (offset >= size)
+        return size;
+    size -= result;
+    offset %= BITS_PER_LONG;
+    if (offset) {
+        tmp = *(p++);
+        tmp |= ~0UL >> (BITS_PER_LONG - offset);
+        if (size < BITS_PER_LONG)
+            goto found_first;
+        if (~tmp)
+            goto found_middle;
+        size -= BITS_PER_LONG;
+        result += BITS_PER_LONG;
+    }
+    while (size & ~(BITS_PER_LONG-1)) {
+        if (~(tmp = *(p++)))
+            goto found_middle;
+        result += BITS_PER_LONG;
+        size -= BITS_PER_LONG;
+    }
+    if (!size)
+        return result;
+    tmp = *p;
 
 found_first:
-       tmp |= ~0UL << size;
-       if (tmp == ~0UL)        /* Are any bits zero? */
-               return result + size;   /* Nope. */
+    tmp |= ~0UL << size;
+    if (tmp == ~0UL)    /* Are any bits zero? */
+        return result + size;    /* Nope. */
 found_middle:
-       return result + ffz(tmp);
+    return result + ffz(tmp);
 }
index 59d0904bf1d32a47983a373e878fc5e8a3e4d407..135f808fdca1d7e4cff0cfb4c5fefd8bed386218 100644 (file)
@@ -83,7 +83,7 @@ void do_external(struct cpu_user_regs *regs)
     vec = xen_mpic_get_irq(regs);
 
     if (irq_desc[vec].status & IRQ_PER_CPU) {
-       /* x86 do_IRQ does not respect the per cpu flag.  */
+        /* x86 do_IRQ does not respect the per cpu flag.  */
         irq_desc_t *desc = &irq_desc[vec];
         regs->entry_vector = vec;
         desc->handler->ack(vec);
index b9928e5e6064eaa893f0efe3ba30219e75500059..44739acdae4e4d3dff0d4f5d3b40a9ba3525a05e 100644 (file)
@@ -98,11 +98,11 @@ static void heap_init(struct membuf *mb, uint entries)
     ulong start_blk;
     ulong end_blk = 0;
 
-       for (i = 0; i < entries; i++) {
-           start_blk = mb[i].start;
-           end_blk = start_blk + mb[i].size;
+    for (i = 0; i < entries; i++) {
+        start_blk = mb[i].start;
+        end_blk = start_blk + mb[i].size;
 
-           if (start_blk < xenheap_phys_end) {
+        if (start_blk < xenheap_phys_end) {
             if (xenheap_phys_end > end_blk) {
                 panic("xenheap spans LMB\n");
             }
@@ -114,7 +114,7 @@ static void heap_init(struct membuf *mb, uint entries)
 
         init_boot_pages(start_blk, end_blk);
         total_pages += (end_blk - start_blk) >> PAGE_SHIFT;
-       }
+    }
 }
 
 static void ofd_walk_mem(void *m, walk_mem_fn fn)
index 8797b5d2e9839ebb52c7d0ec7a8d5c5eac267914..60e6a50c631dec493fd18a00f9d7d5e120ffe9c7 100644 (file)
@@ -33,15 +33,15 @@ enum {
 union of_pci_hi {
     u32 word;
     struct {
-        u32    opa_n: 1; /* relocatable */
-        u32    opa_p: 1; /* prefetchable */
-        u32    opa_t: 1; /* aliased */
+        u32 opa_n: 1; /* relocatable */
+        u32 opa_p: 1; /* prefetchable */
+        u32 opa_t: 1; /* aliased */
         u32 _opa_res: 3;
-        u32    opa: 2; /* space code */
+        u32 opa: 2; /* space code */
         u32  opa_b: 8; /* bus number */
-        u32    opa_d: 5; /* device number */
-        u32    opa_f: 3; /* function number */
-        u32    opa_r: 8; /* register number */
+        u32 opa_d: 5; /* device number */
+        u32 opa_f: 3; /* function number */
+        u32 opa_r: 8; /* register number */
     } bits;
 };
 
@@ -79,9 +79,9 @@ struct reg_property32 {
 typedef s32 ofdn_t;
 
 #define OFD_ROOT 1
-#define OFD_DUMP_NAMES 0x1
-#define OFD_DUMP_VALUES        0x2
-#define OFD_DUMP_ALL   (OFD_DUMP_VALUES|OFD_DUMP_NAMES)
+#define OFD_DUMP_NAMES 0x1
+#define OFD_DUMP_VALUES 0x2
+#define OFD_DUMP_ALL (OFD_DUMP_VALUES|OFD_DUMP_NAMES)
 
 extern void *ofd_create(void *mem, size_t sz);
 extern ofdn_t ofd_node_parent(void *mem, ofdn_t n);
@@ -90,9 +90,9 @@ extern ofdn_t ofd_node_child(void *mem, ofdn_t p);
 extern const char *ofd_node_path(void *mem, ofdn_t p);
 extern int ofd_node_to_path(void *mem, ofdn_t p, void *buf, size_t sz);
 extern ofdn_t ofd_node_child_create(void *mem, ofdn_t parent,
-                                   const char *path, size_t pathlen);
+                                    const char *path, size_t pathlen);
 extern ofdn_t ofd_node_peer_create(void *mem, ofdn_t sibling,
-                                  const char *path, size_t pathlen);
+                                   const char *path, size_t pathlen);
 extern ofdn_t ofd_node_find(void *mem, const char *devspec);
 extern ofdn_t ofd_node_add(void *m, ofdn_t n, const char *path, size_t sz);
 extern int ofd_node_prune(void *m, ofdn_t n);
@@ -102,14 +102,14 @@ extern ofdn_t ofd_node_io(void *mem, ofdn_t n);
 extern ofdn_t ofd_nextprop(void *mem, ofdn_t n, const char *prev, char *name);
 extern ofdn_t ofd_prop_find(void *mem, ofdn_t n, const char *name);
 extern int ofd_getprop(void *mem, ofdn_t n, const char *name,
-                       void *buf, size_t sz);
+                       void *buf, size_t sz);
 extern int ofd_getproplen(void *mem, ofdn_t n, const char *name);
 
 extern int ofd_setprop(void *mem, ofdn_t n, const char *name,
-                       const void *buf, size_t sz);
+                       const void *buf, size_t sz);
 extern void ofd_prop_remove(void *mem, ofdn_t node, ofdn_t prop);
 extern ofdn_t ofd_prop_add(void *mem, ofdn_t n, const char *name,
-                          const void *buf, size_t sz);
+                           const void *buf, size_t sz);
 extern ofdn_t ofd_io_create(void *m, ofdn_t node, u64 open);
 extern u32 ofd_io_open(void *mem, ofdn_t n);
 extern void ofd_io_close(void *mem, ofdn_t n);
@@ -129,10 +129,10 @@ extern size_t ofd_size(void *mem);
 extern size_t ofd_space(void *mem);
 
 extern void ofd_prop_print(const char *head, const char *path,
-                          const char *name, const char *prop, size_t sz);
+                           const char *name, const char *prop, size_t sz);
 
 extern ofdn_t ofd_node_find_by_prop(void *mem, ofdn_t n, const char *name,
-                                   const void *val, size_t sz);
+                                    const void *val, size_t sz);
 extern ofdn_t ofd_node_find_next(void *mem, ofdn_t n);
 extern ofdn_t ofd_node_find_prev(void *mem, ofdn_t n);
 extern void ofd_init(int (*write)(const char *, size_t len));
index 798f028a66b12a2a4ab493ee115613ec2dd99921..1c576ef3c2dbbabca3d26c9bece1410e7ef87f4c 100644 (file)
@@ -113,7 +113,7 @@ static s32 ofh_xen_dom0_read(s32 chan, void *buf, u32 count, s32 *actual,
             return ret;
 
         rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_read,
-                count, desc);
+                        count, desc);
         if (rc <= 0) {
             return ret;
         }
@@ -139,7 +139,7 @@ static s32 ofh_xen_dom0_write(s32 chan, const void *buf, u32 count,
             return ret;
 
         rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_write,
-                count, desc);
+                        count, desc);
         if (rc <= 0) {
             return ret;
         }
@@ -157,8 +157,8 @@ static s32 ofh_xen_dom0_write(s32 chan, const void *buf, u32 count,
 static s32 ofh_xen_domu_read(s32 chan, void *buf, u32 count, s32 *actual,
                              ulong b)
 {
-       struct xencons_interface *intf;
-       XENCONS_RING_IDX cons, prod;
+    struct xencons_interface *intf;
+    XENCONS_RING_IDX cons, prod;
     s32 ret;
 
     intf = DRELA(ofh_ihp, b)->ofi_intf;
@@ -180,8 +180,8 @@ static s32 ofh_xen_domu_read(s32 chan, void *buf, u32 count, s32 *actual,
 static s32 ofh_xen_domu_write(s32 chan, const void *buf, u32 count,
                               s32 *actual, ulong b)
 {
-       struct xencons_interface *intf;
-       XENCONS_RING_IDX cons, prod;
+    struct xencons_interface *intf;
+    XENCONS_RING_IDX cons, prod;
     s32 ret;
 
     intf = DRELA(ofh_ihp, b)->ofi_intf;
index 2d29d5819ce24d0b6712fdcfcd6db68c583e3d03..2b7390d25243ad707c9c7d0d7d0bc3f3c8b67011 100644 (file)
@@ -570,7 +570,7 @@ static void h_read(struct cpu_user_regs *regs)
     struct domain_htab *htab = &d->arch.htab;
     union pte volatile *pte;
 
-       if (flags & H_READ_4)
+    if (flags & H_READ_4)
         ptex &= ~0x3UL;
 
     if (ptex > (1UL << htab->log_num_ptes)) {
index 3ffe34a60624aac60f61e55f6b999cc1f684e163..6b1451eff31a4dc3a51c0f8f4f8b81a50689718c 100644 (file)
@@ -33,10 +33,10 @@ unsigned long rtas_base;
 unsigned long rtas_end;
 
 struct rtas_args {
-       int ra_token;
-       int ra_nargs;
-       int ra_nrets;
-       int ra_args[10];
+    int ra_token;
+    int ra_nargs;
+    int ra_nrets;
+    int ra_args[10];
 } __attribute__ ((aligned(8)));
 
 static int rtas_call(struct rtas_args *r)
@@ -44,13 +44,13 @@ static int rtas_call(struct rtas_args *r)
     if (rtas_entry == 0)
         return -ENOSYS;
 
-       return prom_call(r, rtas_base, rtas_entry, rtas_msr);
+    return prom_call(r, rtas_base, rtas_entry, rtas_msr);
 }
 
 int __init rtas_init(void *m)
 {
     static const char halt[] = "power-off";
-       static const char reboot[] = "system-reboot";
+    static const char reboot[] = "system-reboot";
     ofdn_t n;
 
     if (rtas_entry == 0)
@@ -89,7 +89,7 @@ rtas_reboot(void)
 {
     struct rtas_args r;
 
-       if (rtas_reboot_token == -1)
+    if (rtas_reboot_token == -1)
         return -ENOSYS;
 
     r.ra_token = rtas_reboot_token;
index 3d33433c0fd8f9ef745bfc752e89a425a5a993f3..ed09b18461f920b3095bea00390ccd5ee69bb479 100644 (file)
@@ -115,8 +115,8 @@ unsigned int shadow_set_allocation(struct domain *d,
 }
 
 int shadow_domctl(struct domain *d, 
-                                 xen_domctl_shadow_op_t *sc,
-                                 XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
+                  xen_domctl_shadow_op_t *sc,
+                  XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
 {
     if ( unlikely(d == current->domain) )
     {
index 4fb58afaef3455887920eec2ca9d828c00eb8b5f..57f2186df5911c3f97624e732df26e6628891cea 100644 (file)
@@ -109,7 +109,7 @@ int on_selected_cpus(
         if (NOW() > start + stall) {
             printk("IPI start stall: %d ACKS to %d SYNS\n", 
                    atomic_read(&call_data.started), nr_cpus);
-           start = NOW();
+            start = NOW();
         }
     }
 
@@ -172,9 +172,9 @@ void smp_message_recv(int msg, struct cpu_user_regs *regs)
 static void debug_ipi_ack(void *info)
 {
     if (info) {
-       unsigned long start, stall = SECONDS(5);
-       for (start = NOW(); NOW() < start + stall; );
-       printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info);
+        unsigned long start, stall = SECONDS(5);
+        for (start = NOW(); NOW() < start + stall; );
+        printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info);
     }
     return;
 }
@@ -207,7 +207,7 @@ void ipi_torture_test(void)
     mean = tb_to_ns(sum / trials);
 
     printk("IPI latency: min = %ld ticks, max = %ld ticks, mean = %ldns\n",
-          min, max, mean);
+           min, max, mean);
 
     smp_call_function(debug_ipi_ack, "Hi", 0, 1);
 }